<?php
class Server {
  public static function submit_obj($orm, $sys, $inst, $is_iframe) {
    $req = json_decode(Utils::get_param('req', '[]'));
    if ($req->account == '') {
      echo 'Account is empty';
      return;
    }
    if ($req->__password != '') {
      $req->password != md5($req->__password);
    }
    $orm->update('pb_ht_admin', $req);
    if (isset($_SESSION['profile'])) {
      unset($_SESSION['profile']);
    }
  }
}
?>